package com.qf.petmall.starter.articleist.controller;


import com.qf.petmall.starter.articleist.entity.Articlelist;
import com.qf.petmall.starter.articleist.service.IArticlelistService;

import com.qf.petmall.starter.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Zhong_
 * @since 2022-12-06
 */
@CrossOrigin
@RestController
public class ArticlelistController {

    @Autowired
    IArticlelistService articlelistService;


    @GetMapping("/articlelist")
    public R articlelist(){

        List<Articlelist> list = articlelistService.list();

        return R.ok().put("articlelist",list);
    }

}
